﻿<ad:DockableContent
    x:Class="XmlExplorer.ErrorListDockableContent"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:ad="clr-namespace:AvalonDock;assembly=AvalonDock"
    xmlns:local="clr-namespace:XmlExplorer"
    mc:Ignorable="d" 
    d:DesignHeight="300" d:DesignWidth="300">
    
    <ad:DockableContent.Resources>
        <local:ErrorCategoryToImageSourceConverter x:Key="ErrorCategoryToImageSourceConverter" />
    </ad:DockableContent.Resources>
    
    <DataGrid x:Name="DataGridErrorList" IsReadOnly="True" AutoGenerateColumns="False" HeadersVisibility="Column">
        <DataGrid.Columns>
            <DataGridTemplateColumn CanUserResize="False">
                <DataGridTemplateColumn.CellTemplate>
                    <DataTemplate>
                        <Image ToolTip="{Binding Category}" Source="{Binding Category, Converter={StaticResource ErrorCategoryToImageSourceConverter}}" />
                    </DataTemplate>
                </DataGridTemplateColumn.CellTemplate>
                <DataGridTemplateColumn.Header>
                    <TextBlock Text=" " ToolTip="Category" />
                </DataGridTemplateColumn.Header>
            </DataGridTemplateColumn>
            <DataGridTextColumn Binding="{Binding DefaultOrder}" CanUserResize="False">
                <DataGridTextColumn.Header>
                    <TextBlock Text=" " ToolTip="Default Order" />
                </DataGridTextColumn.Header>
            </DataGridTextColumn>
            <DataGridTextColumn Header="Description" Binding="{Binding Description}" />
            <DataGridTextColumn Header="File" Binding="{Binding File}" />
            <!--<DataGridTextColumn Header="Line" Binding="{Binding Line}" />
            <DataGridTextColumn Header="Column" Binding="{Binding Column}" />-->
        </DataGrid.Columns>
    </DataGrid>
</ad:DockableContent>
